package com.test.cxf;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

public class MyClient
{
	public static void main(String[] args)
	{
		JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

		factory.setAddress("http://localhost:8080/myservice");
		factory.setServiceClass(MyService.class);

		MyService myService = (MyService) factory.create();

		System.out.println(myService.getClass() + ", "
				+ myService.getClass().getSuperclass());

		System.out.println(myService.sayHello("zhangsan", "beijing",
				"middle school"));
	}
}
